////
//
/// \file ./include/inc/parser/inc/parser/local_decl_node.hpp
//
//  Copyright 2007, 2008 Chandler Carruth
//
//  Licensed under the Apache License, Version 2.0 (the "License"); you may not
//  use this file except in compliance with the License.  You may obtain a copy
//  of the License at
//
//    http://www.apache.org/licenses/LICENSE-2.0
//
//  Unless required by applicable law or agreed to in writing, software
//  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
//  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
//  License for the specific language governing permissions and limitations
//  under the License.
//
////

#ifndef inc_parser_local_decl_node_header
#define inc_parser_local_decl_node_header

#include <string>

#include <boost/scoped_ptr.hpp>

#include <inc/parser/parse_tree_node.hpp>

namespace inc {
namespace parser {

class WSParser;
class VariableDeclNode;

/// \brief Variable Declaration parse node
/// \author Chandler Carruth
/// \date 2007.08.12
///
/// This parses a local declaration. The declaration associates a label with
/// a type to form a local variable within a scoped block. That's it. All it
/// does is provide the context for a variable declaration at the block level,
/// resulting in a local variable declaration.

class LocalDeclNode : public ParseTreeNode
{
public:
  LocalDeclNode();
  virtual ~LocalDeclNode();

  virtual bool parse( const iterator& first,
                      const iterator& last,
                      iterator& last_parsed );

  virtual VariableDeclNode* get_variable_decl() const;

private:
  boost::scoped_ptr<VariableDeclNode> variable_decl;

  boost::scoped_ptr<WSParser> ws;
};

} //  end parser namespace
} //  end inc namespace
#endif  //  inc_parser_local_decl_node_header
